Lab7: vim visual mode Agenda * visual modes * visual character mode * visual line mode * visual block mode * discussion # general :help visual.txt v visual character mode shift-V visual line mode ctrl-v visual block mode back to normal mode ctrl-[ back to normal mode gv reselect last visual selection (from normal mode) # visual character mode (v) / line mode (shift-V) hjkl modify selection by one character / line modify selection by one character / line shift- modify selection by one word o jump cursor to the other end (other) d delete selection x delete selection c change selection y yank selection p overwrite selection (put) shift-D delete selected lines shift-X delete selected lines shift-C change selected lines shift-Y yank selected lines r[char] replace all characters in selection with [char] > increase indentation [count] times < decrease indentation [count] times ~ toggle case u to lower case U to upper case gu to lower case gU to upper case : visual range ! filter selection through external command # visual block mode (ctrl-v) hjkl move block boundary one character move block boundary one character shift- move block boundary one word o jump cursor to the other end diagonally (other) O jump cursor to the other end horizontally (other) d delete selection x delete selection y yank selection p overwrite selection (put) shift-I Insert on all selected lines at start of block shift-A Insert on all selected lines at end of block c change all selected chunks ~ toggle case u to lower case U to upper case gu to lower case gU to upper case shift-X delete from block start to end of line shift-D delete from block start to end of line shift-C change from block start to end of line > increase indentation [count] times < decrease indentation [count] times r[char] replace all characters in selection with [char]